home *** CD-ROM | disk | FTP | other *** search
- Path: malve.informatik.uni-bonn.de!malerz
- From: malerz@athene.informatik.uni-bonn.de (Andreas Malerz)
- Newsgroups: comp.sys.amiga.programmer
- Subject: Re: Fastest way to clear a Window?
- Date: 8 Feb 1996 13:46:57 GMT
- Organization: Rheinische Friedrich-Wilhelms-Universit"at Bonn, Institut
- Message-ID: <4fcush$58b@apoll.informatik.uni-bonn.de>
- References: <4fck5b$7mm@leofric.coventry.ac.uk>
- NNTP-Posting-Host: malve.informatik.uni-bonn.de
- X-Newsreader: TIN [version 1.2 PL2]
-
- Dave Jackson (dj@coventry.ac.uk) wrote:
- : I'm writing a 3d graphics viewer thingy using intuition windows. What I
- : want to know is, what is the fastest way of clearing a window? At the
- : moment I'm using SetRast() but there must be a faster way. I'm using a
- : custom screen, so I could make it draw lines on a single bitplane and
- : then just clear that one plane, but the RKM:Libraries has nothing on how
- : to clear one plane... help!
-
- : TIA
- : Dave Jackson
-
- Depending on your processor, you can try to do it with the CPU itself.
- The fastest way I know is the following:
-
- Save all registers on STACK
- Save STACK-Pointer somewhere else
-
- Clear all registers
- Put the Address of your bitplane in one Adressregister
- Copy the registers to your plane with "movem"
- Do the last step as often as necessary.
-
- Restore STACK-Pointer
- Restore all registers.
-
- This solution is systemfriendly and on a fast processor faster than the
- blitter.
-
- Best greetings,
- Andy.
-